<template>
  <div class="project">
    <!-- 属性  -->
    <div class="wrapper">
      <div class="wb_header">
        <div>产品属性列表</div>
      </div>
      <div class="warp warp1">
        <el-form :inline="true" :model="queryFrom" class="demo-form-inline">
          <el-form-item label="">
            <el-input placeholder="请输入内容" suffix-icon="el-icon-search" v-model="queryFrom.input1"></el-input>
          </el-form-item> 
        </el-form> 
      </div> 
      <el-table v-loading="loading" :data="configList"> 
        <el-table-column label="属性名" align="center" prop="name" />
        <el-table-column label="属性类型" align="center" prop="typeId" :show-overflow-tooltip="true" />
        <el-table-column label="标识符" align="center" prop="identifier" :show-overflow-tooltip="true" />
        <el-table-column label="数据类型" align="center" prop="dataType" width="140" :show-overflow-tooltip="true" /> 
        <el-table-column label="最小值" align="center" prop="dataMin" width="140" :show-overflow-tooltip="true" /> 
        <el-table-column label="最大值" align="center" prop="dataMax" width="140" :show-overflow-tooltip="true" /> 
        <el-table-column label="单位" align="center" prop="configValue" width="140" :show-overflow-tooltip="true">
          <template slot-scope="scope">
            <div v-if="scope.row.dataUnitZh">{{ scope.row.dataUnitZh }}/{{ scope.row.dataUnitEn }}</div>  
            <div v-else>/</div>
          </template>  
        </el-table-column>  
        <el-table-column label="描述" align="center" min-width="180" prop="remark" :show-overflow-tooltip="true" />  
      </el-table> 
      <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
    </div>
  </div>
</template>

<script>
export default {
data() {
  return {
    queryFrom: {},
    loading: false,
    configList: [
      { "id": 1, "typeId": "状态参数", "name": "上行通信", "identifier": "uplink", "dataType": "int", "dataMin": 0.0, "dataMax": 1.0, "dataDelta": 0, "dataUnitZh": "", "dataUnitEn": "", "remark": "上行通信：1-工作，0-不工作" },
      { "id": 2, "typeId": "状态参数", "name": "蜂窝网络", "identifier": "mobileNet", "dataType": "int", "dataMin": 0.0, "dataMax": 1.0, "dataDelta": 0, "dataUnitZh": "", "dataUnitEn": "", "remark": "蜂窝网络：1-工作,0-不工作" },
      { "id": 3, "typeId": "状态参数", "name": "以太网", "identifier": "eth", "dataType": "int", "dataMin": 0.0, "dataMax": 1.0, "dataDelta": 0, "dataUnitZh": "", "dataUnitEn": "", "remark": "1-工作，0-不工作" },
      { "id": 4, "typeId": "状态参数", "name": "无线通信", "identifier": "txLora1", "dataType": "int", "dataMin": 0.0, "dataMax": 1.0, "dataDelta": 0, "dataUnitZh": "", "dataUnitEn": "", "remark": "无线通讯txLora1: 1-工作，0-不工作" },
      { "id": 5, "typeId": "状态参数", "name": "馈电状态", "identifier": "batFeed", "dataType": "int", "dataMin": 0.0, "dataMax": 1.0, "dataDelta": 0, "dataUnitZh": "", "dataUnitEn": "", "remark": "馈电状态：1馈电，0-不馈电" },
      { "id": 6, "typeId": "状态参数", "name": "充电状态", "identifier": "batCharge", "dataType": "int", "dataMin": 0.0, "dataMax": 1.0, "dataDelta": 0, "dataUnitZh": "", "dataUnitEn": "", "remark": "充电状态：1-充电，0-不充电" },
      { "id": 7, "typeId": "状态参数", "name": "gps状态", "identifier": "gps", "dataType": "int", "dataMin": 0.0, "dataMax": 1.0, "dataDelta": 0, "dataUnitZh": "", "dataUnitEn": "", "remark": "gps状态：1-工作，0-不工作" },
      { "id": 8, "typeId": "状态参数", "name": "rtc状态", "identifier": "rtc", "dataType": "int", "dataMin": 0.0, "dataMax": 1.0, "dataDelta": 0, "dataUnitZh": "", "dataUnitEn": "", "remark": " rtc状态：1-工作，0-不工作" },
      { "id": 9, "typeId": "数据上报", "name": "当天雨量", "identifier": "day_rain", "dataType": "double", "dataMin": 0.0, "dataMax": 100000.0, "dataDelta": 2, "dataUnitZh": "毫升", "dataUnitEn": "mL", "remark": "当天累计雨量" },
      { "id": 10, "typeId": "状态参数", "name": "sd卡状态", "identifier": "sdCard", "dataType": "int", "dataMin": 0.0, "dataMax": 1.0, "dataDelta": 0, "dataUnitZh": "", "dataUnitEn": "", "remark": "sd卡状态：1-工作，0-不工作" }
    ],
    total: 10,
    queryParams:{
      pageNum: 1,
      pageSize: 10,
    }
  }
},
methods:{
  getList(){}, 
}
}
</script>

<style scoped>
@import "~@/assets/styles/tablePage.scss";
</style>